<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:a="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

<ui:define name="body">

    <h:form id="licoes" styleClass="edit">

        <rich:panel>
            <f:facet name="header">#{licoesHome.managed ? 'Edit' : 'Add'} Licoes</f:facet>







            <s:decorate id="descricaoField" template="layout/edit.xhtml">
                <ui:define name="label">Descricao</ui:define>
                <h:inputTextarea id="descricao"
                               cols="80"
                               rows="3"
                           required="true"
                              value="#{licoesHome.instance.descricao}"/>
            </s:decorate>


            <s:decorate id="tituloField" template="layout/edit.xhtml">
                <ui:define name="label">Titulo</ui:define>
                <h:inputTextarea id="titulo"
                               cols="80"
                               rows="3"
                           required="true"
                              value="#{licoesHome.instance.titulo}"/>
            </s:decorate>

            <div style="clear:both">
                <span class="required">*</span>
                required fields
            </div>

        </rich:panel>

        <div class="actionButtons">

            <h:commandButton id="save"
                          value="Save"
                         action="#{licoesHome.persist}"
                       disabled="#{!licoesHome.wired}"
                       rendered="#{!licoesHome.managed}"/>

            <h:commandButton id="update"
                          value="Save"
                         action="#{licoesHome.update}"
                       rendered="#{licoesHome.managed}"/>

            <h:commandButton id="delete"
                          value="Delete"
                         action="#{licoesHome.remove}"
                      immediate="true"
                       rendered="#{licoesHome.managed}"/>

            <s:button id="cancelEdit"
                   value="Cancel"
             propagation="end"
                    view="/Licoes.xhtml"
                rendered="#{licoesHome.managed}"/>

            <s:button id="cancelAdd"
                   value="Cancel"
             propagation="end"
                    view="/#{empty licoesFrom ? 'LicoesList' : licoesFrom}.xhtml"
                rendered="#{!licoesHome.managed}"/>

        </div>
    </h:form>

<rich:tabPanel switchType="ajax">

    <rich:tab label="Areaimpactada *" labelClass="required">
    <div class="association" id="areaimpactadaParent">

        <h:outputText value="There is no areaimpactada associated with this licoes."
                   rendered="#{licoesHome.instance.areaimpactada == null}"/>

        <rich:dataTable var="_areaimpactada"
                   value="#{licoesHome.instance.areaimpactada}"
                rendered="#{licoesHome.instance.areaimpactada != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="areaimpactadaTable">
            <h:column>
                <f:facet name="header">Id</f:facet>
                <h:outputText value="#{_areaimpactada.id}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Nome</f:facet>
                <h:outputText value="#{_areaimpactada.nome}"/>
            </h:column>
        </rich:dataTable>

        <div class="actionButtons">
            <s:button id="#{licoesHome.instance.areaimpactada != null ? 'changeParent' : 'selectParent'}" value="#{licoesHome.instance.areaimpactada != null ? 'Change' : 'Select'} areaimpactada"
                       view="/AreaimpactadaList.xhtml">
                <f:param name="from" value="LicoesEdit"/>
            </s:button>
        </div>

    </div>
    </rich:tab>

    <rich:tab label="Projeto *" labelClass="required">
    <div class="association" id="projetoParent">

        <h:outputText value="There is no projeto associated with this licoes."
                   rendered="#{licoesHome.instance.projeto == null}"/>

        <rich:dataTable var="_projeto"
                   value="#{licoesHome.instance.projeto}"
                rendered="#{licoesHome.instance.projeto != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="projetoTable">
            <h:column>
                <f:facet name="header">Id</f:facet>
                <h:outputText value="#{_projeto.id}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Statusprojeto id</f:facet>
                <h:outputText value="#{_projeto.statusprojeto.id}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Usuario id</f:facet>
                <h:outputText value="#{_projeto.usuario.id}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Cliente</f:facet>
                <h:outputText value="#{_projeto.cliente}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Custoprevisto</f:facet>
                <h:outputText value="#{_projeto.custoprevisto}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Datacriacao</f:facet>
                <h:outputText value="#{_projeto.datacriacao}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Fim</f:facet>
                <h:outputText value="#{_projeto.fim}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Fimprevisto</f:facet>
                <h:outputText value="#{_projeto.fimprevisto}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Inicio</f:facet>
                <h:outputText value="#{_projeto.inicio}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Justificativa</f:facet>
                <h:outputText value="#{_projeto.justificativa}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Necessidades</f:facet>
                <h:outputText value="#{_projeto.necessidades}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Nome</f:facet>
                <h:outputText value="#{_projeto.nome}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Orcamento</f:facet>
                <h:outputText value="#{_projeto.orcamento}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Premissas</f:facet>
                <h:outputText value="#{_projeto.premissas}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Produto</f:facet>
                <h:outputText value="#{_projeto.produto}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Responsabilidadesgp</f:facet>
                <h:outputText value="#{_projeto.responsabilidadesgp}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Restricoes</f:facet>
                <h:outputText value="#{_projeto.restricoes}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Resumo</f:facet>
                <h:outputText value="#{_projeto.resumo}"/>
            </h:column>
        </rich:dataTable>

        <div class="actionButtons">
            <s:button id="#{licoesHome.instance.projeto != null ? 'changeParent' : 'selectParent'}" value="#{licoesHome.instance.projeto != null ? 'Change' : 'Select'} projeto"
                       view="/ProjetoList.xhtml">
                <f:param name="from" value="LicoesEdit"/>
            </s:button>
        </div>

    </div>
    </rich:tab>

    <rich:tab label="Prioridadelicao *" labelClass="required">
    <div class="association" id="prioridadelicaoParent">

        <h:outputText value="There is no prioridadelicao associated with this licoes."
                   rendered="#{licoesHome.instance.prioridadelicao == null}"/>

        <rich:dataTable var="_prioridadelicao"
                   value="#{licoesHome.instance.prioridadelicao}"
                rendered="#{licoesHome.instance.prioridadelicao != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="prioridadelicaoTable">
            <h:column>
                <f:facet name="header">Id</f:facet>
                <h:outputText value="#{_prioridadelicao.id}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Nome</f:facet>
                <h:outputText value="#{_prioridadelicao.nome}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Valor</f:facet>
                <h:outputText value="#{_prioridadelicao.valor}"/>
            </h:column>
        </rich:dataTable>

        <div class="actionButtons">
            <s:button id="#{licoesHome.instance.prioridadelicao != null ? 'changeParent' : 'selectParent'}" value="#{licoesHome.instance.prioridadelicao != null ? 'Change' : 'Select'} prioridadelicao"
                       view="/PrioridadelicaoList.xhtml">
                <f:param name="from" value="LicoesEdit"/>
            </s:button>
        </div>

    </div>
    </rich:tab>

    <rich:tab label="Impactolicao *" labelClass="required">
    <div class="association" id="impactolicaoParent">

        <h:outputText value="There is no impactolicao associated with this licoes."
                   rendered="#{licoesHome.instance.impactolicao == null}"/>

        <rich:dataTable var="_impactolicao"
                   value="#{licoesHome.instance.impactolicao}"
                rendered="#{licoesHome.instance.impactolicao != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="impactolicaoTable">
            <h:column>
                <f:facet name="header">Id</f:facet>
                <h:outputText value="#{_impactolicao.id}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Nome</f:facet>
                <h:outputText value="#{_impactolicao.nome}"/>
            </h:column>
        </rich:dataTable>

        <div class="actionButtons">
            <s:button id="#{licoesHome.instance.impactolicao != null ? 'changeParent' : 'selectParent'}" value="#{licoesHome.instance.impactolicao != null ? 'Change' : 'Select'} impactolicao"
                       view="/ImpactolicaoList.xhtml">
                <f:param name="from" value="LicoesEdit"/>
            </s:button>
        </div>

    </div>
    </rich:tab>
</rich:tabPanel>
</ui:define>

</ui:composition>
